package com.yc.jpa.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.entity.Student;
import com.yc.jpa.dao.StudentDao;

@Service("jpaDemoService")
public class JpaDemoServiceImpl implements JpaDemoService {
	
	@Autowired 
    private StudentDao studentDao;

	@Override
	public void testJpa() {
		List<Student> list1 = studentDao.findMyTel("1885656565");
		System.out.println(list1.get(0).getName());
		System.out.println("---------------------");
		List<String> list2 = studentDao.findAllTel();
		for (String tel : list2) {
			System.out.println(tel);
		}

	}

}
